|
|
|
| |
|
|
|
|
It is not a good idea to append your workspace definitions to the Workspaces collection in a production environment. In rare cases, someone could "listen in" on a network connection that uses workspaces and hack one or more of the valid names, users, and passwords for secured tables. This can be done by locating and walking through the Workspaces collection. To prevent troubles, it is a good idea to never append workspaces to the Workspaces collection. |
|
|
|
|
|
|
|
|
|
|
Save and run the project. After you click the New WS button, you see two workspaces displayed on the form. Check your screen against the one in Figure 9.6. |
|
|
|
|
|
|
|
|
Figure 9.6.
The results of adding a
new Workspace object. |
|
|
|
|
|
|
|
|
Using the Workspace Object Methods |
|
|
|
|
|
|
|
|
The Workspace object methods fall into several related groups. Table 9.2 shows the Workspace methods in their respective groups. |
|
|
|
|
| Table 9.2. Workspace methods. | | Group | Method | | Transactions | BeginTrans, CommitTrans, Rollback | | Security | CreateUser, CreateGroup | | Microsoft Jet | CreateDatabase, OpenDatabase, Close | | ODBCDirect | OpenConnection, Close |
|
|
|
|
|
|
You learn more about the Transaction group on Day 17, "Multiuser Considerations," and the Security group is covered on Day 21. The ODBCDirect methods are covered in another section in this chapter. That leaves the Microsoft Jet database methods: CreateDatabase, OpenDatabase, and Close. |
|
|
|
|
|